<script setup lang="ts">
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app'
import { checkTokenExpiration, clearAllCache } from './utils/auth'
import { useUserStore } from '@/store/user' // 引入用户 store

const userStore = useUserStore()

onLaunch(() => {
  // 检查 token 是否过期
  checkTokenExpiration()
})

onShow(() => {
  console.log('App Show')
})

onHide(() => {
  console.log('App Hide')
})
</script>

<style lang="scss">
page {
  background-color: #f0f0f0;
  font-family: 'PingFang SC';
  --uni-custom-color: #{$uni-color-custom};
  --uni-color-error: #{$uni-color-error};
}
</style>
